package Installer::Command::DropFiles;

use JIP::ToolSet; # load my commonly-used modules in a single import
use parent qw( Build::Command );

use Taxonomy qw( getAllTaxonomies contentTypeToTableName );

sub execute {
    my $self = shift;

    $self->log->Note('executing "DropFiles" command...');

    foreach my $eachContentType ( getAllTaxonomies() ) {
        my $tableName = contentTypeToTableName( $eachContentType );

        $self->log->Note( "drop ". $tableName ." table" );

        $self->orm->storage->dbh->do( "DROP TABLE IF EXISTS ". $tableName );
    }

    $self->log->Note('"DropFiles" finished');
}


1;
